package baseTest;

import java.util.Scanner;

public class chess2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();
        long[][] arr = new long[a+1][b+1];
        for (int i = 0; i <=a ; i++) {
            for (int j = 0; j <=b ; j++) {
                if (i==c && j==d || i==c-2 && (j==d+1 || j==d-1) || i==c-1 && (j==d+2 || j==d-2) || i==c+2 && (j==d+1 || j==d-1) || i==c+1 && (j==d+2 || j==d-2)){
                    arr[i][j] = -1;
                }
            }
        }
        for (int i = a; i >=0; i--) {
            if (arr[i][b]==-1){
                for (int j = i; j >= 0; j--) {
                    arr[j][b]=0;
                }
                arr[i][b]=0;
                break;
            }
            arr[i][b] = 1;
        }
        for (int i = b; i>=0; i--) {
            if (arr[a][i]==-1){
                for (int j = i; j >=0 ; j--) {
                            arr[a][j] = 0;
                }
                arr[a][i] = 0;
                break;
            }
            arr[a][i] = 1;
        }
        arr[a][b] = 1;
        for (int i = a-1; i >=0 ; i--) {
            for (int j = b-1; j >=0; j--) {
                if (arr[i][j]!=-1){
                    arr[i][j] = arr[i+1][j] + arr[i][j+1];
                }else arr[i][j] = 0;
            }
        }
        System.out.println(arr[0][0]);
    }
}
